package com.service.Impl;

import com.dao.UserRandDao;
import com.service.UserRandService;

public class UserRandServiceImpl implements UserRandService {

    private UserRandDao userRandDao;

    public UserRandServiceImpl(){}
    public UserRandServiceImpl(UserRandDao userRandDao) {
        this.userRandDao = userRandDao;
    }

    @Override
    public int selectRand_numByUser_id(int user_id) {
        return userRandDao.selectRand_numByUser_id(user_id);
    }

    @Override
    public void insertUserRand(int user_id, int rand_num) {
        userRandDao.insertUserRand(user_id,rand_num);
    }

    @Override
    public void updateRand_numByUser_id(int user_id, int rand_num) {
        userRandDao.updateRand_numByUser_id(user_id,rand_num);
    }

    public UserRandDao getUserRandDao() {
        return userRandDao;
    }

    public void setUserRandDao(UserRandDao userRandDao) {
        this.userRandDao = userRandDao;
    }
}
